Crash Course of Lua
Table of Contents
1. Variables, Scope and Global
do ... end serves the functionality of “scope” in Lua, as { ... } do in other languages. To define a local variable, use local keyword.
To declare global variables, in Lua 5.5, we should explicitly use global keyword.